Skip to content

fix: Set DKG pool's initial start height to latest CUP height#9786

Open
eichhorl wants to merge 3 commits intomasterfrom
eichhorl/correct-start-height
Open

fix: Set DKG pool's initial start height to latest CUP height#9786
eichhorl wants to merge 3 commits intomasterfrom
eichhorl/correct-start-height

Conversation

@eichhorl
Copy link
Copy Markdown
Contributor

@eichhorl eichhorl commented Apr 9, 2026

Background

The DKG pool's current_start_height is initialized once, when creating the pool, and then updated to the height of the new summary block, whenever the DKG pool is purged. Therefore, it serves as a watermark of the latest purge.

Apart from that, its main purpose is to enable the bouncer:

  1. We accept all dealings with a start height equal to the pool's current height. Accepting them means the dealings will be inserted into the unvalidated pool section.
  2. We defer dealings with a higher start height.
  3. We reject dealings with a lower start height.

Problem

Before this PR, the current_start_height was initialized to 1 whenever the replica starts. This means that during the very first interval starting at height 0 (i.e. just after a subnet was created), the bouncer rejects legitimate dealings for start height 0. Functionally, the DKG may still be completed, because nodes continue to propagate their own dealings to other peers, by including their own dealings into their own block proposals (as opposed to also including their peer's dealings in their own block proposals).

However, this behavior is confusing, and it makes DKG slightly more difficult during the first interval (as no dealings are broadcasted by themselves). This also affects latency of remote DKG request being made during the first interval.

Proposed Changes

Instead of initializing the current_start_height with 1, this PR proposes to initialize it to the height of the latest CUP at the time of the replica start. Unlike 1, this represents a valid start height, and also makes sense conceptually (lower dealings are rejected, higher dealings deferred until the height is reached).

@github-actions github-actions bot added the fix label Apr 9, 2026
@eichhorl eichhorl added the CI_ALL_BAZEL_TARGETS Runs all bazel targets label Apr 9, 2026
@eichhorl eichhorl marked this pull request as ready for review April 9, 2026 13:33
@eichhorl eichhorl requested a review from a team as a code owner April 9, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant